﻿using UnityEngine;
using System.Collections;

public class SplashScreenWait : MonoBehaviour {
	
	public GameObject blackPlane;

	// Use this for initialization
	void Start () {
		//iTween.FadeTo
		iTween.FadeTo(blackPlane, 0f, 2f);
		StartCoroutine(screenWait());
		
	}
	
	// Update is called once per frame
	void Update () {
	
	}
	
	IEnumerator screenWait()
	{
		yield return new WaitForSeconds(4f);
		iTween.FadeTo(blackPlane, 1f, 2f);
		yield return new WaitForSeconds(2f);
		Application.LoadLevel("MainMenu");		
	}
}
